home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / hello_localized / hello_strings.h < prev    next >
C/C++ Source or Header  |  1995-09-01  |  2KB  |  129 lines

  1. #ifndef HELLO_STRINGS_H
  2. #define HELLO_STRINGS_H
  3.  
  4.  
  5. /****************************************************************************/
  6.  
  7.  
  8. /* This file was created automatically by CatComp.
  9.  * Do NOT edit by hand!
  10.  */
  11.  
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifdef CATCOMP_ARRAY
  18. #undef CATCOMP_NUMBERS
  19. #undef CATCOMP_STRINGS
  20. #define CATCOMP_NUMBERS
  21. #define CATCOMP_STRINGS
  22. #endif
  23.  
  24. #ifdef CATCOMP_BLOCK
  25. #undef CATCOMP_STRINGS
  26. #define CATCOMP_STRINGS
  27. #endif
  28.  
  29.  
  30. /****************************************************************************/
  31.  
  32.  
  33. #ifdef CATCOMP_NUMBERS
  34.  
  35. #define MSG_HELLO 0
  36.  
  37. #endif /* CATCOMP_NUMBERS */
  38.  
  39.  
  40. /****************************************************************************/
  41.  
  42.  
  43. #ifdef CATCOMP_STRINGS
  44.  
  45. #define MSG_HELLO_STR "\nHello World! (Internal Version!)\n\n"
  46.  
  47. #endif /* CATCOMP_STRINGS */
  48.  
  49.  
  50. /****************************************************************************/
  51.  
  52.  
  53. #ifdef CATCOMP_ARRAY
  54.  
  55. struct CatCompArrayType
  56. {
  57.     LONG   cca_ID;
  58.     STRPTR cca_Str;
  59. };
  60.  
  61. static const struct CatCompArrayType CatCompArray[] =
  62. {
  63.     {MSG_HELLO,(STRPTR)MSG_HELLO_STR},
  64. };
  65.  
  66. #endif /* CATCOMP_ARRAY */
  67.  
  68.  
  69. /****************************************************************************/
  70.  
  71.  
  72. #ifdef CATCOMP_BLOCK
  73.  
  74. static const char CatCompBlock[] =
  75. {
  76.     "\x00\x00\x00\x00\x00\x24"
  77.     MSG_HELLO_STR "\x00"
  78. };
  79.  
  80. #endif /* CATCOMP_BLOCK */
  81.  
  82.  
  83. /****************************************************************************/
  84.  
  85.  
  86. struct LocaleInfo
  87. {
  88.     APTR li_LocaleBase;
  89.     APTR li_Catalog;
  90. };
  91.  
  92.  
  93. #ifdef CATCOMP_CODE
  94.  
  95. STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
  96. {
  97. LONG   *l;
  98. UWORD  *w;
  99. STRPTR  builtIn;
  100.  
  101.     l = (LONG *)CatCompBlock;
  102.  
  103.     while (*l != stringNum)
  104.     {
  105.         w = (UWORD *)((ULONG)l + 4);
  106.         l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  107.     }
  108.     builtIn = (STRPTR)((ULONG)l + 6);
  109.  
  110. #define XLocaleBase LocaleBase
  111. #define LocaleBase li->li_LocaleBase
  112.     
  113.     if (LocaleBase)
  114.         return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
  115. #define LocaleBase XLocaleBase
  116. #undef XLocaleBase
  117.  
  118.     return(builtIn);
  119. }
  120.  
  121.  
  122. #endif /* CATCOMP_CODE */
  123.  
  124.  
  125. /****************************************************************************/
  126.  
  127.  
  128. #endif /* HELLO_STRINGS_H */
  129.